package com.cz.zslu.mapper;

import com.cz.zslu.entity.BaseAttachment;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * 附件 Mapper 接口
 * </p>
 *
 */
public interface BaseAttachmentMapper extends BaseMapper<BaseAttachment> {
    /**
     * 附件解除绑定
     *
     * @param theirId
     * @param
     * @return
     */
    @Update("update base_attachment set type = null , their_id = null where their_id= ${theirId} and type= '${type}'")
    Integer fileUnbind(@Param("theirId") Long theirId, @Param("type") String type);
}
